package name.matthewgreet.example1.action; import javax.servlet.http.HttpSession; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.InterceptorRef; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; import com.opensymphony.xwork2.ActionSupport; import name.matthewgreet.example1.common.AbstractActionSupport; import name.matthewgreet.example1.vo.CountryList; /** * Finds countries to initially display. */ @InterceptorRef("FormDrivenStack") @Results({ @Result(name=ActionSupport.INPUT, type="redirectAction", params = {"namespace", "/", "actionName", "ViewCountryList"}), @Result(name=ActionSupport.SUCCESS, type="redirectAction", params = {"namespace", "/", "actionName", "ViewCountryList"}) }) public class FindCountryListInitialAction extends AbstractActionSupport { private static final long serialVersionUID = -7979376337555804889L; @Action("/FindCountryListInitial") @Override public String execute() throws Exception { HttpSession session; session = getBrowserTabSession(); ViewCountryListAction.storeFirstChar(session, 'A'); ViewCountryListAction.storeSearchResults(session, CountryList.getInstance().getByFirstLetter('A')); return SUCCESS; } }